<template>
  <div>
    <input type="text" :value="num" @input="handleInput">
  </div>
</template>
<script>
export default {
  props: {
    num: {
      type: [Number, String],
      required: true
    }
  },
  methods: {
    handleInput(e) {
      this.$emit('changenum', e.target.value)
    }
  }
}
</script>
<style>
  
</style>